package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.entity.GoodsCategoryLog;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2024-02-21
 */
public interface GoodsCategoryLogService extends IService<GoodsCategoryLog> {

    int getMaxOrderNum(Long categoryId);

    List<GoodsCategoryLog> getByGoodsId(Long goodsId);

    void dropByGoodsIdAndIdsNot(Long goodsId, List<Long> ids);

    GoodsCategoryLog getGtShowOrder(Long categoryId, Integer showOrder);

    GoodsCategoryLog getLtShowOrder(Long categoryId, Integer showOrder);

    GoodsCategoryLog getTopOrder(Long categoryId);

    /**
     * 设置序号
     */
    void updateShowOrder(Long id, Integer orderNum);

    GoodsCategoryLog getByGoodsIdAndCategoryId(Long goodsId, Long categoryId);

    long getByCategoryId(Long categoryId);

    void updateOtherOrderAddOne(Long id, Long categoryId);
}
